package user

import (
	v1 "gitee.com/g-qs/gin-vue-admin/server/api/v1"
	"gitee.com/g-qs/gin-vue-admin/server/plugin/geo/api"
	"github.com/gin-gonic/gin"
)

type BaseRouter struct {
}

func (b *BaseRouter) InitBaseRouter(Router *gin.RouterGroup) {
	baseRouter := Router.Group("/base")
	assessRouter := Router.Group("/assess")
	baseApi := v1.ApiGroupApp.UserApiGroup.BaseApi
	plugApi := api.ApiGroupApp.GeoApi
	exaFileUploadAndDownloadApi := v1.ApiGroupApp.ExampleApiGroup.FileUploadAndDownloadApi
	assessApi := v1.ApiGroupApp.AssessApiGroup.AssessApi
	{
		baseRouter.POST("signUp", baseApi.SignUp)                                  // 注册
		baseRouter.POST("signIn", baseApi.SignIn)                                  // 登陆
		baseRouter.GET("getAppLink", baseApi.GetAppLink)                           // 获取下载链接
		baseRouter.GET("getBAppLink", baseApi.GetBAppLink)                         // 获取下载链接
		baseRouter.POST("forgetPassword", baseApi.ForgetPassword)                  // 忘记密码
		baseRouter.POST("upload", exaFileUploadAndDownloadApi.UploadFile)          // 单文件上传
		baseRouter.GET("getGeos", plugApi.GetGeos)                                 // 获取地址列表
		baseRouter.GET("getGeoByWhere", plugApi.GetGeoInfoByWhere)                 // 获取地址信息
		baseRouter.GET("getLatelyReport", assessApi.GetLatelyReport)               // 查询最近报告
		assessRouter.GET("getQuestionResultByID", assessApi.GetQuestionResultByID) // 根据用户ID获取问卷结果
	}
}
